
export function tableChangePagination(pagination, filtersArg, sorter) {
    const filters = Object.keys(filtersArg).reduce((obj, key) => {
      const newObj = { ...obj };
      newObj[key] = getValue(filtersArg[key]);
      return newObj;
    }, {});

    const params = {
      headers: {
        'x-page-num': pagination.current,
        'x-page-size': pagination.pageSize
      },
      
    };
    if (sorter.field) {
      params.headers['x-sort-by'] = `${sorter.field}`
      if("descend" === sorter.order){
        params.headers['x-order'] = 'desc';
      }else{
        params.headers['x-order'] = 'asc';
      }
    }

    return params;
  };